﻿<UserControl x:Class="RapidDict.Modules.LanguagesToolbar.Views.LanguagesToolbarView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation">
    <UserControl.Resources>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>    
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <ComboBox Grid.Column="0" Style="{DynamicResource ComboBoxFlatStyle}" ItemsSource="{Binding Path=LanguagesList}" SelectedItem="{Binding Path=SourceLanguage}"/>
        <Button x:Name="Revert" Style="{DynamicResource ButtonFlatStyle}" Grid.Column="1" commands:Click.Command="{Binding RevertCommand}">
            <Image Width="25" Height="19" Source="/RapidDict.Modules.LanguagesToolbar;Component/Sources/icon-swap.png"/>        
        </Button>
        <ComboBox Grid.Column="2" Style="{DynamicResource ComboBoxFlatStyle}" ItemsSource="{Binding Path=LanguagesList}" SelectedItem="{Binding Path=TargetLanguage}"/>
    </Grid>
</UserControl>
